
layout (location = 0) in vec3 position;
//layout (location = 1) in vec3 color;
layout (location = 1) in vec2 coord;

//out vec4 vertexColor;
out vec2 texCoord;
out vec2 smileCoord;

uniform vec2 smile;
uniform mat4 model;
uniform mat4 view;
uniform mat4 projection;
uniform mat4 rotationZ;
uniform mat4 scaleXY;

void main()
{
	gl_Position = projection * view * model * vec4(position, 1.0f);
//	gl_Position = vec4(position, 1.0f);
//	vertexColor = vec4(color, 1.0f);
	texCoord = vec2(coord.x, 1.0f - coord.y);

	smileCoord = texCoord.xy - 0.5f;
	vec4 c = rotationZ * scaleXY * vec4(smileCoord, 0.0f, 1);
	smileCoord = c.xy + 0.5;
}

